﻿using ProgrammingEducationSystem.Models;

namespace ProgrammingEducationSystem.Services.IServices
{
    /// <summary>
    /// 教室接口
    /// </summary>
    public interface IClassRoomsService
    {
        //查询

        /// <summary>
        /// 查询某个时间段，某个教室是否有空
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        Task<bool> HaveLeisureAsync(Guid classRoomId,string date);

        /// <summary>
        /// 返回所有该时间段有空的教室
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        Task<List<ClassRoom>> HaveLeisureAsync(string date);
        Task<ClassRoom?> GetById(Guid id);

        //新增
        /// <summary>
        /// 新增一个教室
        /// </summary>
        /// <returns></returns>
        Task AddAsync(ClassRoom classRoom);


        //删除

        /// <summary>
        /// 删除某个教室 ==》有课不可删除
        /// </summary>
        /// <param name="classRoomId"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(Guid classRoomId);
        Task<List<ClassRoom>?> AllAsync();
        void UpdateAsync(ClassRoom classRoom);
        Task<bool> SaveAsync();

    }
}
